package com.ysyx.ysyx_admin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 司机车辆信息表
 * @TableName car_inf
 */
@TableName(value ="car_inf")
@Data
public class CarPojo implements Serializable {
    /**
     * 车辆信息编号PK
     */
    @TableId(type = IdType.AUTO)
    private Integer carId;

    /**
     * 车辆司机驾驶证号
     */
    private String carDriverno;

    /**
     * 驾驶证照片
     */
    private String carDrivernoimg;

    /**
     * 行驶证照片
     */
    private String carRunproveimg;

    /**
     * 车牌号
     */
    private String carPlateno;

    /**
     * 车辆照片
     */
    private String carImg;

    /**
     * 车辆颜色
     */
    private String carColor;

    /**
     * 车辆品牌型号
     */
    private String carBrand;

    /**
     * 司机id
     */
    private Integer driverId;



    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CarPojo other = (CarPojo) that;
        return (this.getCarId() == null ? other.getCarId() == null : this.getCarId().equals(other.getCarId()))
            && (this.getCarDriverno() == null ? other.getCarDriverno() == null : this.getCarDriverno().equals(other.getCarDriverno()))
            && (this.getCarDrivernoimg() == null ? other.getCarDrivernoimg() == null : this.getCarDrivernoimg().equals(other.getCarDrivernoimg()))
            && (this.getCarRunproveimg() == null ? other.getCarRunproveimg() == null : this.getCarRunproveimg().equals(other.getCarRunproveimg()))
            && (this.getCarPlateno() == null ? other.getCarPlateno() == null : this.getCarPlateno().equals(other.getCarPlateno()))
            && (this.getCarImg() == null ? other.getCarImg() == null : this.getCarImg().equals(other.getCarImg()))
            && (this.getCarColor() == null ? other.getCarColor() == null : this.getCarColor().equals(other.getCarColor()))
            && (this.getCarBrand() == null ? other.getCarBrand() == null : this.getCarBrand().equals(other.getCarBrand()))
            && (this.getDriverId() == null ? other.getDriverId() == null : this.getDriverId().equals(other.getDriverId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCarId() == null) ? 0 : getCarId().hashCode());
        result = prime * result + ((getCarDriverno() == null) ? 0 : getCarDriverno().hashCode());
        result = prime * result + ((getCarDrivernoimg() == null) ? 0 : getCarDrivernoimg().hashCode());
        result = prime * result + ((getCarRunproveimg() == null) ? 0 : getCarRunproveimg().hashCode());
        result = prime * result + ((getCarPlateno() == null) ? 0 : getCarPlateno().hashCode());
        result = prime * result + ((getCarImg() == null) ? 0 : getCarImg().hashCode());
        result = prime * result + ((getCarColor() == null) ? 0 : getCarColor().hashCode());
        result = prime * result + ((getCarBrand() == null) ? 0 : getCarBrand().hashCode());
        result = prime * result + ((getDriverId() == null) ? 0 : getDriverId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", carId=").append(carId);
        sb.append(", carDriverno=").append(carDriverno);
        sb.append(", carDrivernoimg=").append(carDrivernoimg);
        sb.append(", carRunproveimg=").append(carRunproveimg);
        sb.append(", carPlateno=").append(carPlateno);
        sb.append(", carImg=").append(carImg);
        sb.append(", carColor=").append(carColor);
        sb.append(", carBrand=").append(carBrand);
        sb.append(", driverId=").append(driverId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}